public class Course {
    private String cid;
    private String cname;
    private int hours;
    private int credit;

    public Course(String cid, String cname, int hours, int credit) {
        this.cid = cid;
        this.cname = cname;
        this.hours = hours;
        this.credit = credit;
    }

    @Override
    public String toString() {
        return "课程号: " + cid + ", 课程名: " + cname +
                ", 课时: " + hours + ", 学分: " + credit;
    }

    // Getter 方法
    public String getCid() {
        return cid;
    }

    public String getCname() {
        return cname;
    }

    public int getHours() {
        return hours;
    }

    public int getCredit() {
        return credit;
    }
}